<template lang="pug">
  keep-alive
    kalix-table(bizKey="Discuss" title='讨论列表' ref="kalixTable"
    v-bind:tableFields="tableFields"
    v-bind:targetURL="discussURL"
    v-bind:bizDialog="discussDialog"
    v-bind:btnList="discussBtnList"
    v-bind:toolbarBtnList="toolbarBtnList"
    bizSearch="discussSearch")
</template>

<script type="text/ecmascript-6">
  import {DiscussURL} from '../../config.toml'
  import {discussConfigBtnList} from './config'
  import KalixTable from '../../../../../components/corelib/components/common/baseTable'

  export default {
    name: 'kalix-mooc-discuss',
    components: {KalixTable},
    data() {
      return {
        discussURL: DiscussURL,
        tableFields: [
          {prop: 'userName', label: '用户名称'},
          {prop: 'cname', label: '课程名称'},
          {prop: 'discussTitle', label: '讨论主题'},
          {prop: 'discussEnclosure', label: '讨论详情'},
          {prop: 'thumbsupCounts', label: '点赞数'},
          // {prop: 'updateDate', label: '评论时间'},
          {prop: 'dateTime', label: '评论时间'}
        ],
        discussDialog: [
          {id: 'add', dialog: 'discussAdd'},
          {id: 'edit', dialog: 'discussEdit'},
          {id: 'view', dialog: 'discussView'}
        ],
        discussBtnList: discussConfigBtnList,
        toolbarBtnList: [
          {id: 'add', isShow: true, title: '添加', icon: 'icon-pinleizengjia', isPermission: true}
        ]
      }
    }
  }
</script>

<style scoped lang="stylus">

</style>
